import React from 'react';
import { Button, Typography } from 'antd';

const { Text } = Typography;

const ErrorView = ({ error, onBack }) => {
  return (
    <div className="error-view">
      <div className="error-content">
        <Text className="error-message">{error}</Text>
        <Button 
          type="primary" 
          onClick={onBack}
          className="back-button"
        >
          返回网络列表
        </Button>
      </div>
    </div>
  );
};

export default ErrorView;